home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2008 February / PCWFEB08.iso / Software / Resources / Utilities / Partition Logic 0.68 / partlogic-0.68.iso / system / headers / sys / iso.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-05-10  |  3.0 KB  |  101 lines

  1. // 
  2. //  Visopsys
  3. //  Copyright (C) 1998-2007 J. Andrew McLaughlin
  4. //  
  5. //  This library is free software; you can redistribute it and/or modify it
  6. //  under the terms of the GNU Lesser General Public License as published by
  7. //  the Free Software Foundation; either version 2.1 of the License, or (at
  8. //  your option) any later version.
  9. //
  10. //  This library is distributed in the hope that it will be useful, but
  11. //  WITHOUT ANY WARRANTY; without even the implied warranty of
  12. //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser
  13. //  General Public License for more details.
  14. //
  15. //  You should have received a copy of the GNU Lesser General Public License
  16. //  along with this library; if not, write to the Free Software Foundation,
  17. //  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  18. //
  19. //  iso.h
  20. //
  21.  
  22. // This file contains definitions and structures for using and manipulating
  23. // ISO 9660 filesystems in Visopsys.
  24.  
  25. #if !defined(_ISO_H)
  26.  
  27. // Definitions
  28. #define ISO_PRIMARY_VOLDESC_SECTOR        16
  29. #define ISO_STANDARD_IDENTIFIER           "CD001"
  30. #define ISO_DESCRIPTORTYPE_BOOT           0
  31. #define ISO_DESCRIPTORTYPE_PRIMARY        1
  32. #define ISO_DESCRIPTORTYPE_SUPPLEMENTARY  2
  33. #define ISO_DESCRIPTORTYPE_PARTITION      3
  34. #define ISO_DESCRIPTORTYPE_TERMINATOR     255
  35.  
  36. #define ISO_FLAGMASK_HIDDEN               0x01
  37. #define ISO_FLAGMASK_DIRECTORY            0x02
  38. #define ISO_FLAGMASK_ASSOCIATED           0x04
  39. #define ISO_FLAGMASK_EXTENDEDSTRUCT       0x08
  40. #define ISO_FLAGMASK_EXTENDEDPERM         0x10
  41. #define ISO_FLAGMASK_LINKS                0x80
  42.  
  43. // Structures
  44.  
  45. typedef struct {
  46.   unsigned char recordLength;
  47.   unsigned char extAttrLength;
  48.   unsigned long long blockNumber;
  49.   unsigned long long size;
  50.   unsigned char date[7];
  51.   unsigned char flags;
  52.   unsigned char unitSize;
  53.   unsigned char intrGapSize;
  54.   unsigned volSeqNumber;
  55.   unsigned char nameLength;
  56.   char name[];
  57.  
  58. } __attribute__((packed)) isoDirectoryRecord;
  59.  
  60. typedef struct {
  61.   unsigned char type;
  62.   char identifier[5];
  63.   unsigned char version;
  64.   unsigned char unused1;
  65.   char systemIdentifier[32];
  66.   char volumeIdentifier[32];
  67.   unsigned char unused2[8];
  68.   unsigned long long volumeBlocks;
  69.   unsigned char unused3[32];
  70.   unsigned volumeSetSize;
  71.   unsigned volumeSequenceNum;
  72.   unsigned blockSize;
  73.   unsigned long long pathTableSize;
  74.   unsigned pathTableBlock;
  75.   unsigned optTypeLPathTable;
  76.   unsigned typeMPathTable;
  77.   unsigned optTypeMPathTable;
  78.   isoDirectoryRecord rootDirectoryRecord;
  79.   char __rootDirRecNamePadding__;
  80.   char volumeSetId[128];
  81.   char publisherId[128];
  82.   char preparerId[128];
  83.   char applicationId[128];
  84.   char copyrightFileId[37];
  85.   char abstractFileId[37];
  86.   char biblioFileId[37];
  87.   unsigned char creationDate[17];
  88.   unsigned char modificationDate[17];
  89.   unsigned char expirationDate[17];
  90.   unsigned char effectiveDate[17];
  91.   unsigned char fileStructVersion;
  92.   unsigned char unused4;
  93.   unsigned char applicationData[512];
  94.   unsigned char unused5[653];
  95.  
  96. } __attribute__((packed)) isoPrimaryDescriptor;
  97.  
  98.  
  99. #define _ISO_H
  100. #endif
  101.